<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <title>layui在线调试</title>
    <link rel="stylesheet" th:href="@{/webjars/layui/2.5.4/css/layui.css}" href="//res.layui.com/layui/dist/css/layui.css?t=1568076536509" media="all">
    <link rel="stylesheet" type="text/css" th:href="@{/css2/H-ui.admin.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/css2/H-ui.min.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/css2/iconfont.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/css2/skin.css}" id="skin" />
    <link rel="stylesheet" type="text/css" th:href="@{/css2/jquery.contextMenu.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/css2/style.css}"/>

    <link rel="stylesheet" type="text/css" href="static/h-ui/css/H-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="static/h-ui.admin/skin/default/skin.css" id="skins" />
    <link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/style.css" />

</head>
<body>
<div class="page-container">
    <div class="cl pd-5 bg-1 bk-gray mt-20">
        <input id="123" type="text" style="display: none">
       <!-- <span>
            &lt;!&ndash;<a href="javascript:;" onclick="member_add('添加','/carseat','','510')" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i> 添加</a>&ndash;&gt;
            <a href="/carseat" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i>添加</a>
        </span>-->

    </div>
    <div class="mt-20">
        <table id = "tbo" class="table table-border table-bordered table-hover table-bg table-sort">
            <thead>
            <tr class="text-c">
                <th width="60">停车位置ID</th>
                <th width="50">房产</th>
                <th width="80">车位编号</th>
                <th width="80">状态</th>
                <th width="100">车位类型</th>
                <th width="100">管理类型</th>
                <th width="150">位置</th>

                <th width="80">操作</th>
            </tr>
            </thead>
            <tbody>
            <tr class="text-c" th:each="obj:${list}">
                <!--<td><input name="subBox"  type="checkbox" th:value="${obj.cs_id}"></td>-->
                <td th:text="${obj.cs_id}">位置id</td>
                <td th:text="${obj.cs_housing}">业主</td>
                <td th:text="${obj.cS_number}">车牌号</td>
                <td th:text="${obj.cs_state}">状态</td>
                <td th:text="${obj.cs_cartype }">车位类型</td>
                <td class="text-c" th:text="${obj.cs_manage}">管理类型</td>
                <!--<td class="text-c" th:text="${obj.cs_sell}">预售价格</td>
                <td th:text="${obj.cs_rent}">预租价格</td>-->
                <td th:text="${obj.ca_plilce}">位置</td>


                <!--<th width="100" th:text="${obj.p_date}">缴费日期</th>-->
                    <th class="f-14 product-band-manage">
                        <!--<a title="添加费用" href="/selid"><i class="Hui-iconfont">&#xe600;</i></a>-->
                        <!--<a title="添加费用" th:href="@{/edit(id=${student.id})}></a>-->
                        <a th:href="@{/selid(id=${obj.cs_id})}"><i class="Hui-iconfont">&#xe600;</i></a>
                        <a title="查看详情" href="javascript:;" th:id="${obj.cs_id}" onclick="shouhuoren(this)"><i class="Hui-iconfont">&#xe617;</i></a>

                    </th>
            </tr>
            </tbody>

        </table>
    </div>
</div>
<script type="text/javascript" src="lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="static/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="static/h-ui.admin/js/H-ui.admin.js"></script>

<script th:src="@{/webjars/jquery/2.1.1/jquery.js}"></script>
<script th:src="@{/js2/jquery.dataTables.min.js}"></script>
<script>
    $(document).ready(function(){
        $(function(){
            $('#tbo').DataTable({
                "aLengthMenu":[5,8,10]
                /*
                * "aaSorting": [
                    [ 1, "desc" ]
                ]//默认第几个排序
                * */
            });
        });

        var ms = $("#123").val();
        if(ms==123){
            alert("添加成功！")
            return false;
        }
    });
   /* function hh(obj) {
        var p_id=$(obj).attr("id");
        var arr=new Array();
        arr=p_id.split(',');
        var a=arr[0];
        var b=arr[1];
        alert(a);
        alert(b);
        if(p_state!=1){
            alert("该用户已支付")
        }else {
            $.ajax({
                url:"upParking",
                data:{"p_state":p_state},
                type:"post",
                dataType:"text",
                success:function (data) {

                }
            });
        }
    }*/
    //=====弹出窗设置
    function DelTipWidth(Twidth,Theight){
        $(".tip_box",Wparent).css({"width":Twidth+"px","height":Theight+"px","margin-top":-(Theight/2)+"px","margin-left":-(Twidth/2)+"px"});
        $(".tip_close",Wparent).on("click",Tipclose);
    }
    //=====关闭弹出窗
    function Tipclose(){
        $(".tip_box",Wparent).remove(); //移除新增的外层className
        $(".tip_bg",Wparent).remove(); //移除新增的背景className
        window.location.reload();
    }

    var Wparent = window.document;
    var Bg = "<div class='tip_bg tipbg_top'></div>",
        Box = "<div class='tip_box tipbox_top'></div>";
    function shouhuoren(obj){
        $("body",Wparent).append(Bg);
        $("body",Wparent).append(Box);
        var checkId = $(obj).attr("id");
        console.log(checkId);
        $(".tip_box",Wparent).prepend("<h2>详情<span class='tip_close'><i class='fa fa-close'>关闭</i></span></h2><div class='tip_tbox'></div>");
        $(".tip_tbox",Wparent).append("<iframe src='parkingInfo?id="+checkId+"' frameborder='0' width='100%' height='100%' seamless></iframe>");
        DelTipWidth(1000,470);
    }
    /*var zt = $("#ztai").text();
    alert(zt);
    $(function () {
        $("#fabu").click(function () {

        })
    })*/
</script>
<script type="text/javascript">
    /*用户-添加*/
    function member_add(title,url,w,h){
        layer_show(title,url,w,h);
    }
    /*用户-编辑*/
    function member_edit(title,url,id,w,h){
        layer_show(title,url,w,h);
    }
</script>
</body>
</html>